<form class="form-horizontal" name="userForm" id="userForm" novalidate autocomplete="off">
    <fieldset>
        <legend>编辑用户信息</legend>
        <input type="hidden" name="user_id" ng-model="user.user_id" required>
        <div class="form-group">
            <label class="col-sm-2 control-label">昵称</label>
            <div class="col-sm-5">
                <input type="text" name="name" class="form-control" ng-model="nickname" required>
            </div>
            <div class="col-sm-5">
                <span class="val-error" ng-show="userForm.name.$invalid&&userForm.name.$dirty">
            <span ng-show="userForm.name.$error.required">
                昵称不能为空
            </span>
                </span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">密码</label>
            <div class="col-sm-5">
                <input type="password" name="password" class="form-control" ng-model="password" required>
                </div>
                <div class="col-sm-5">
                <span class="val-error" ng-show="userForm.password.$dirty&&userForm.password.$invalid">
                <span ng-show="userForm.password.$error.required" style="coler:red;">密码不能为空</span>
                </span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">重复密码：</label>
            <div class="col-sm-5">
                <input type="password" name="password2" class="form-control" required>
            </div>
            <div class="col-sm-5">
                <span class="val-error" ng-show="userForm.password2.$dirty&&userForm.password2.$invalid">
            <span ng-hide="isEqual()"> 密码不一致，请确认密码！</span>
                </span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">头像</label>
            <div class="col-sm-10">
                <input type="file" name="thumb" ng-model="user.thumb">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-2">
                <button class="btn btn-primary" ng-click="update()">确定</button>
            </div>
            <div class="col-sm-offset-1 col-sm-2">
                <button class="btn btn-default" ui-sref="index">取消</button>
            </div>
        </div>
    </fieldset>
</form>
